<%@ page import="edu.auctionmart.Item" %>



<div class="fieldcontain ${hasErrors(bean: itemInstance, field: 'name', 'error')} ">
	<label for="name">
		<g:message code="item.name.label" default="Name" />
		
	</label>
	<g:textField name="name" value="${itemInstance?.name}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: itemInstance, field: 'description', 'error')} ">
	<label for="description">
		<g:message code="item.description.label" default="Description" />
		
	</label>
	<g:textField name="description" value="${itemInstance?.description}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: itemInstance, field: 'category', 'error')} required">
	<label for="category">
		<g:message code="item.category.label" default="Category" />
		<span class="required-indicator">*</span>
	</label>
	<g:select name="category" from="${edu.auctionmart.ItemCategory?.values()}" keys="${edu.auctionmart.ItemCategory.values()*.name()}" required="" value="${itemInstance?.category?.name()}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: itemInstance, field: 'isbn', 'error')} ">
	<label for="isbn">
		<g:message code="item.isbn.label" default="Isbn" />
		
	</label>
	<g:textField name="isbn" value="${itemInstance?.isbn}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: itemInstance, field: 'weight', 'error')} ">
	<label for="weight">
		<g:message code="item.weight.label" default="Weight" />
		
	</label>
	<g:field type="number" name="weight" value="${fieldValue(bean: itemInstance, field: 'weight')}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: itemInstance, field: 'dimension', 'error')} ">
	<label for="dimension">
		<g:message code="item.dimension.label" default="Dimension" />
		
	</label>
	<g:textField name="dimension" value="${itemInstance?.dimension}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: itemInstance, field: 'quantity', 'error')} required">
	<label for="quantity">
		<g:message code="item.quantity.label" default="Quantity" />
		<span class="required-indicator">*</span>
	</label>
	<g:field type="number" name="quantity" min="1" required="" value="${fieldValue(bean: itemInstance, field: 'quantity')}"/>
</div>

